<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use View;

class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;

    /**
     * 侧边菜单的激活状态
     * 
     * 面包屑菜单
     * 
     * 页面名称已经描述
    */

    public $module;

    public $parent_module;

    public $breadcrumb_name;

    public $page_name;

    public $page_describe;

    public function __construct()
    {
    	View::share('active', [$this->module=>'active']);
    	View::share('parent_active', [$this->parent_module=>'active']);
        View::share('breadcrumb_name', $this->breadcrumb_name);
        View::share('page_name', $this->page_name);
        View::share('page_describe', $this->page_describe);
    }
}
